<template>
  <div>
   
    <van-dropdown-menu>
      <van-dropdown-item-dict dictType="SEX" @dictChange="handleChange" v-model="value1"></van-dropdown-item-dict>
      <van-dropdown-item-dict dictType="STATUSHIERARCHY" v-model="value2"></van-dropdown-item-dict>
    </van-dropdown-menu>

    <van-dropdown-menu>
      <van-dropdown-item-dict :dictType="{type: 'SEX', filters: '9', reverse: true}" @dictChange="handleChange" v-model="value1"></van-dropdown-item-dict>
      <van-dropdown-item-dict :filterDataFun="filterDataFun"  dictType="STATUSHIERARCHY" v-model="value2"></van-dropdown-item-dict>
    </van-dropdown-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value1: "1",
      value2: "2"
    }
  },
  methods: {
    handleChange(val) {
      console.log("🚀 ~ file: index.vue:21 ~ handleChange ~ val:", val)
      console.log(this.value1)
    },
    filterDataFun(list) {
      return list.filter(item => ["1", "2"].includes(item.value))
    }
  }
}
</script>

<style>

</style>